/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.system.action.system;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.system.mapper.system.CompanyListConfigureMapper;
public class CompanyListConfigure extends BaseAction
{
    @Autowired(required=false)
	private CompanyListConfigureMapper mapper;
    /**
    公司列表管理
    */
    
    public Map companyListConfigure() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_link=mapper.s_link(params);
        result.put("s_link", s_link);
        
        return result;
    }
    /**
    公司列表访问
    */
    
    public Map companyListVisit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean("s_menu_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> s_menu=mapper.s_menu(params);
        s_menu = s_menu.buildTree(tb,tb.getPid());
        result.put("s_menu", s_menu);
        
        return result;
    }
    /**
    公司列表树形修改
    */
    
    public Map companyListTreeSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.companyListTreeSubmit(params);
        
        
        for (SQLMap emt:hqlBean.getTableElements("firm")){
            params=new SQLParam(request,emt.getMap());
            mapper.b_firm_auth(params);
        }
        
        return result;
    }
    /**
    公司列表访问修改
    */
    
    public Map companyListVisitSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.companyListVisitSubmit(params);
        
        
        for (SQLMap emt:hqlBean.getTableElements("firm_auth")){
            params=new SQLParam(request,emt.getMap());
            mapper.b_firm_auth(params);
        }
        
        return result;
    }
}